package com.kzw.oa.comm.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.kzw.oa.system.model.AppUser;
import com.kzw.oa.system.model.Department;

/**
 * 通知公告信息
 */
@Entity
@Table(name = "comm_tongbao")
public class TongBao implements Serializable {

	private static final long serialVersionUID = -6051612844869614692L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long oid;
	// 标题
	@Column(length = 100)
	private String title;
	// 作者
	@ManyToOne
	@JoinColumn(name = "author_id")
	private AppUser author;
	// 发布单位
	@ManyToOne
	@JoinColumn(name = "dept_id")
	private Department dept;
	// 创建时间
	private Date ctime = new Date();
	// 过期时间
	private Date expTime;
	// 内容
	@Column(length = 4000)
	private String content;

	private Integer sn;
	// 选择范围: 部门
	@Column(length = 200)
	private String recDepIds;
	@Column(length = 1000)
	private String recDepNames;

	// 是否下级单位显示（0：不显示，1：显示）
	private int downDeptShow;
	// 状态：（0：禁用，1：激活）
	private int status;
	// 附件: json
	@Column(length = 1000)
	private String files;

	public Long getOid() {
		return oid;
	}

	public void setOid(Long oid) {
		this.oid = oid;
	}

	public Date getExpTime() {
		return expTime;
	}

	public void setExpTime(Date expTime) {
		this.expTime = expTime;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getSn() {
		return sn;
	}

	public void setSn(Integer sn) {
		this.sn = sn;
	}

	public String getRecDepIds() {
		return recDepIds;
	}

	public void setRecDepIds(String recDepIds) {
		this.recDepIds = recDepIds;
	}

	public String getRecDepNames() {
		return recDepNames;
	}

	public void setRecDepNames(String recDepNames) {
		this.recDepNames = recDepNames;
	}

	public int getDownDeptShow() {
		return downDeptShow;
	}

	public void setDownDeptShow(int downDeptShow) {
		this.downDeptShow = downDeptShow;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public AppUser getAuthor() {
		return author;
	}

	public void setAuthor(AppUser author) {
		this.author = author;
	}

	public Date getCtime() {
		return ctime;
	}

	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}

	public Department getDept() {
		return dept;
	}

	public void setDept(Department dept) {
		this.dept = dept;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getFiles() {
		return files;
	}

	public void setFiles(String files) {
		this.files = files;
	}

}
